<?php 
	namespace Admin\Controller;
	use Think\Controller;

	class CommonController extends Controller{
		//初始化方法(构造方法)
		public function _initialize(){
			if (empty($_SESSION)) 
			{
				$this->error('请登录',U('Login/login'));
			}
		}
	}

?>